package com.opgea.tutor.domain.entities;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable
public class Phone implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 6283981999687798195L;
    private String phoneNo;
    private String description;

    public String getPhoneNo() {
	return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
	this.phoneNo = phoneNo;
    }

    public String getDescription() {
	return description;
    }

    public void setDescription(String description) {
	this.description = description;
    }

    @Override
    public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((phoneNo == null) ? 0 : phoneNo.hashCode());
	return result;
    }

    @Override
    public boolean equals(Object obj) {
	if (this == obj)
	    return true;
	if (obj == null)
	    return false;
	if (getClass() != obj.getClass())
	    return false;
	Phone other = (Phone) obj;
	if (phoneNo == null) {
	    if (other.phoneNo != null)
		return false;
	} else if (!phoneNo.equals(other.phoneNo))
	    return false;
	return true;
    }

}
